﻿using System;

// Token: 0x020001D8 RID: 472
public class LookAction : AgentAction
{
	// Token: 0x06000A1C RID: 2588 RVA: 0x00059C78 File Offset: 0x00057E78
	public LookAction(EntityBase targetToLook)
	{
		if (targetToLook == null)
		{
			this.name = "Look Default";
		}
		else
		{
			this.name = "Look at " + targetToLook.name;
		}
		this.target = targetToLook;
	}

	// Token: 0x06000A1D RID: 2589 RVA: 0x00059CC4 File Offset: 0x00057EC4
	public override void StartAction()
	{
		if (this.agent.isGiantess)
		{
			this.agent.ik.head.LookAt(this.target);
		}
		else if (this.agent.isMicro)
		{
			if (this.agent.isPlayer)
			{
				Player player = this.agent as Player;
				player.LookAt(this.target);
			}
			else
			{
				AnimatedMicroNPC animatedMicroNPC = this.agent as AnimatedMicroNPC;
				animatedMicroNPC.LookAt(this.target);
			}
		}
	}

	// Token: 0x06000A1E RID: 2590 RVA: 0x000597B1 File Offset: 0x000579B1
	public override bool IsCompleted()
	{
		return this.hasStarted;
	}

	// Token: 0x04000F85 RID: 3973
	private EntityBase target;
}
